home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 3
/
Aminet 3 - July 1994.iso
/
Aminet
/
gfx
/
pbm
/
source1.lha
/
netpbm
/
pnm
/
Makefile.dice
< prev
next >
Wrap
Makefile
|
1986-02-28
|
11KB
|
266 lines
# Makefile for pnm tools.
#
# Copyright (C) 1989, 1991 by Jef Poskanzer.
# Modified for Amiga DICE by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation. This software is provided "as is" without express or
# implied warranty.
# CONFIG: generate executable with debugging information
#DEBUG = -s -d1
# CONFIG: use memory pools
#MPOOL = -L/amiga -l mpool
CC = dcc
CFLAGS = -E DCC_ERRORS -ms -mu -gs $(DEBUG)
TIFFDEF = -DLIBTIFF
LDFLAGS = $(MPOOL) /amiga/dice_stack.o
BINDIR = bin
MERGE = pnmmerge
# where to install the binaries, libraries and important header files
INSTALLBIN = bin:pbmplus
INSTALLLIB = dlib:local
INSTALLINCL= dinclude:local
# install which headers
HEADERS= pnm.h /pbmplus.h
PBMDIR = /pbm
INCLUDEPBM = -I$(PBMDIR)
RLIBPBM = $(PBMDIR)/pbmsr.lib
RLLIBPBM = $(PBMDIR)/pbmrl.lib
SLIBPBM = $(PBMDIR)/pbms.lib
SLLIBPBM = $(PBMDIR)/pbml.lib
DEFPBM = $(PBMDIR)/pbm.h /pbmplus.h
DEFLIBPBM = $(PBMDIR)/libpbm.h
PGMDIR = /pgm
INCLUDEPGM = -I$(PGMDIR)
RLIBPGM = $(PGMDIR)/pgmsr.lib
RLLIBPGM = $(PGMDIR)/pgmrl.lib
SLIBPGM = $(PGMDIR)/pgms.lib
SLLIBPGM = $(PGMDIR)/pgml.lib
DEFPGM = $(PGMDIR)/pgm.h
DEFLIBPGM = $(PGMDIR)/libpgm.h
PPMDIR = /ppm
INCLUDEPPM = -I$(PPMDIR)
RLIBPPM = $(PPMDIR)/ppmsr.lib
RLLIBPPM = $(PPMDIR)/ppmrl.lib
SLIBPPM = $(PPMDIR)/ppms.lib
SLLIBPPM = $(PPMDIR)/ppml.lib
DEFPPM = $(PPMDIR)/ppm.h
DEFLIBPPM = $(PPMDIR)/libppm.h
TIFFDIR = /libtiff
TIFFINC = -I$(TIFFDIR)
TIFFLIB = $(TIFFDIR)/libtiff.lib
INCLUDE = -I/ $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM)
RALLCFLAGS = $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -proto -mRR
SALLCFLAGS = $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -proto
MALLCFLAGS = $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -mC -mD
DEFPNM = pnm.h
#DEFLIBPNM = libpnm.h
RLIBPNM = pnmsr.lib
RLLIBPNM = pnmrl.lib
SLIBPNM = pnms.lib
SLLIBPNM = pnml.lib
LIBRARIES = $(RLIBPNM) $(RLLIBPNM) $(SLIBPNM) $(SLLIBPNM)
BINS = pnmarith pnmcat pnmconvol pnmcrop pnmcut \
pnmdepth pnmenlarge pnmfile pnmflip pnmgamma pnmhistmap \
pnminvert pnmnoraw pnmpaste pnmtile \
pnmtoddif pnmtorast pnmtoxwd rasttopnm xwdtopnm \
pnmcomp zeisstopnm pnmpad pnmtosir sirtopnm \
sgitopnm pnmtosgi
MATHBINS = pnmrotate pnmscale pnmshear pnmtops \
pnmnlfilt fitstopnm pnmalias pnmtofits
LMATHBINS = giftopnm
TIFFBINS = tifftopnm pnmtotiff
BINARIES = $(BINS) $(MATHBINS) $(TIFFBINS) $(LMATHBINS)
SCRIPTS = anytopnm pnmindex pnmmargin pnmsmooth pstopnm
OBJS = pnmarith.om pnmcat.om pnmconvol.om pnmcrop.om pnmcut.om \
pnmdepth.om pnmenlarge.om pnmfile.om pnmflip.om pnmhistmap.om \
pnminvert.om pnmnoraw.om pnmpaste.om pnmscale.om pnmtile.om \
pnmtoddif.om pnmtops.om pnmtorast.om pnmtoxwd.om rasttopnm.om \
xwdtopnm.om pnmgamma.om pnmrotate.om pnmshear.om pnmcomp.om \
zeisstopnm.om pnmnlfilt.om pnmpad.om pnmtosir.om sirtopnm.om \
giftopnm.om fitstopnm.om pnmalias.om pnmtofits.om \
sgitopnm.om pnmtosgi.om
TIFFOBJECTS = tifftopnm.om pnmtotiff.om
OBJECTS = $(OBJS) $(TIFFOBJECTS)
all: lib binaries
bindir:
-makedir $(BINDIR)
binaries: lib bindir $(BINARIES)
lib: $(LIBRARIES)
merge: $(SLLIBPNM) bindir $(MERGE)
# Rules for merged binary
.c.om: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $<
$(CC) -proto $(MALLCFLAGS) "-Dmain=$*_main" -c $*.c -o $*.om
$(MERGE): pnmmerge.c $(OBJECTS) $(SLLIBPNM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM) $(TIFFLIB)
$(CC) $(MALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c $(OBJECTS) -l $(SLLIBPNM) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -l $(TIFFLIB) -lm
# Rule for objects.
#$(OBJECTS): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM)
# $(CC) -mD -mC $(SALLCFLAGS) -c $*.c "-Dmain=$*_main"
# Rules for plain programs.
$(BINS): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPNM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
$(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPNM) -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM)
# Rule for math-dependent programs.
$(MATHBINS): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPNM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
$(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPNM) -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM) -lm
$(LMATHBINS): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLLIBPNM) $(RLLIBPPM) $(RLLIBPGM) $(RLLIBPBM)
$(CC) -mD -mC $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLLIBPNM) -l $(RLLIBPPM) -l $(RLLIBPGM) -l $(RLLIBPBM) -lm
# Rules for TIFF programs.
$(TIFFBINS): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(SLLIBPNM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM) $(TIFFLIB)
$(CC) -mD -mC $(SALLCFLAGS) $(LDFLAGS) $@.c -o $(BINDIR)/$@ -l $(SLLIBPNM) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -l $(TIFFLIB) -lm
# And libraries.
#$(LIBPBM):
# cd $(PBMDIR) ; make lib
#$(LIBPGM) FOO:
# cd $(PGMDIR) ; make lib
#$(LIBPPM) BAR:
# cd $(PPMDIR) ; make lib
# small data version
$(RLIBPNM): libpnm1.or libpnm2.or libpnm3.or libpnm4.or
-delete $(RLIBPNM)
join libpnm1.or libpnm2.or libpnm3.or libpnm4.or to $(RLIBPNM)
libpnm1.or: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm1.c
libpnm2.or: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm2.c
libpnm3.or: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm3.c
libpnm4.or: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm4.c
# small data version, not registerized (arguments on stack)
$(SLIBPNM): libpnm1.os libpnm2.os libpnm3.os libpnm4.os
-delete $(SLIBPNM)
join libpnm1.os libpnm2.os libpnm3.os libpnm4.os to $(SLIBPNM)
libpnm1.os: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm1.c
libpnm2.os: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm2.c
libpnm3.os: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm3.c
libpnm4.os: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm4.c
# large data version
$(RLLIBPNM): libpnm1.olr libpnm2.olr libpnm3.olr libpnm4.olr
-delete $(RLLIBPNM)
join libpnm1.olr libpnm2.olr libpnm3.olr libpnm4.olr to $(RLLIBPNM)
libpnm1.olr: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm1.c
libpnm2.olr: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm2.c
libpnm3.olr: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm3.c
libpnm4.olr: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm4.c
# large data version, not registerized (arguments on stack)
$(SLLIBPNM): libpnm1.ols libpnm2.ols libpnm3.ols libpnm4.ols
-delete $(SLLIBPNM)
join libpnm1.ols libpnm2.ols libpnm3.ols libpnm4.ols to $(SLLIBPNM)
libpnm1.ols: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm1.c
libpnm2.ols: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm2.c
libpnm3.ols: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm3.c
libpnm4.ols: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm4.c
# Other dependencies.
pnmarith pnmarith.om: pnmarith.c
pnmcat pnmcat.om: pnmcat.c
pnmconvol pnmconvol.om: pnmconvol.c
pnmcrop pnmcrop.om: pnmcrop.c
pnmcut pnmcut.om: pnmcut.c
pnmdepth pnmdepth.om: pnmdepth.c
pnmenlarge pnmenlarge.om: pnmenlarge.c
pnmfile pnmfile.om: pnmfile.c
pnmflip pnmflip.om: pnmflip.c
pnmgamma pnmgamma.om: pnmgamma.c
pnminvert pnminvert.om: pnminvert.c
pnmhistmap pnmhistmao.om: pnmhistmap.c
pnmnoraw pnmnoraw.om: pnmnoraw.c
pnmpaste pnmpaste.om: pnmpaste.c
pnmrotate pnmrotate.om: pnmrotate.c
pnmscale pnmscale.om: pnmscale.c
pnmshear pnmshear.om: pnmshear.c
pnmtile pnmtile.om: pnmtile.c
pnmtoddif pnmtoddif.om: pnmtoddif.c
pnmtops pnmtops.om: pnmtops.c
pnmtorast pnmtorast.om: pnmtorast.c rast.h
pnmtotiff pnmtotiff.om: pnmtotiff.c
pnmtoxwd pnmtoxwd.om: pnmtoxwd.c x11wd.h
rasttopnm rasttopnm.om: rasttopnm.c rast.h
tifftopnm tifftopnm.om: tifftopnm.c
xwdtopnm xwdtopnm.om: xwdtopnm.c x10wd.h x11wd.h
pnmcomp pnmcomp.om: pnmcomp.c
zeisstopnm zeisstopnm.om: zeisstopnm.c
pnmnlfilt pnmnlfilt.om: pnmnlfilt.c
pnmpad pnmpad.om: pnmpad.c
zeisstopnm zeisstopnm.om: zeisstopnm.c
pnmtosir pnmtosir.om: pnmtosir.c
sirtopnm sirtopnm.om: sirtopnm.c
giftopnm giftopnm.om: giftopnm.c
fitstopnm fitstopnm.om: fitstopnm.c
pnmalias pnmalias.om: pnmalias.c
pnmtofits pnmtofits.om: pnmtofits.c
sgitopnm sgitopnm.om: sgitopnm.c sgi.h
pnmtosgi pnmtosgi.om: pnmtosgi.c sgi.h
clean:
-delete \#?.om \#?.os \#?.or \#?.ols \#?.olr DCC_ERRORS
cleanall: clean
-delete \#?.lib
-delete $(BINDIR) all
installlib: lib
copy $(LIBRARIES) to $(INSTALLLIB)
copy $(HEADERS) to $(INSTALLINCL)
installbin: binaries
copy $(BINDIR) all to $(INSTALLBIN)
installall: installlib installbin
install:
@echo "Please select: installlib, installbin, installall"